﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using cecb.Data;

namespace cecbcodeplex
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
       

        public MainWindow()
        {
            InitializeComponent();
          //  DssContext = new DSSEntities();
        }

     //   cecb.Data.DSSEntities DssContext;
        private void lblSettings_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Frm_SystemSettings frm = new Frm_SystemSettings();
            frm.Show();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Frm_Home frm = new Frm_Home();
            frm.Show();
            this.Close();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
          //  textBox1.Text = cecb.Methodes.UserLogin.base64Encode(tbxPassword.Text.Trim());
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
           // textBox1.Text = cecb.Methodes.UserLogin.GetMD5Hash(tbxPassword.Text.Trim());
        }

        private void btn_Login_Click(object sender, RoutedEventArgs e)
        {

        }

        private System.Data.Objects.ObjectQuery<Employee_Login> GetEmployee_LoginQuery(DSSEntities1 dSSEntities1)
        {
            // Auto generated code

            System.Data.Objects.ObjectQuery<cecbcodeplex.Employee_Login> employee_LoginQuery = dSSEntities1.Employee_Login;
            // To explicitly load data, you may need to add Include methods like below:
            // employee_LoginQuery = employee_LoginQuery.Include("Employee_Login.Employee").
            // For more information, please see http://go.microsoft.com/fwlink/?LinkId=157380
            // Returns an ObjectQuery.
            return employee_LoginQuery;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {

            cecbcodeplex.DSSEntities1 dSSEntities1 = new cecbcodeplex.DSSEntities1();
            // Load data into Employee_Login. You can modify this code as needed.
            System.Windows.Data.CollectionViewSource employee_LoginViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("employee_LoginViewSource")));
            System.Data.Objects.ObjectQuery<cecbcodeplex.Employee_Login> employee_LoginQuery = this.GetEmployee_LoginQuery(dSSEntities1);
            employee_LoginViewSource.Source = employee_LoginQuery.Execute(System.Data.Objects.MergeOption.AppendOnly);
        }

         

        
    }
}
